package main

import (
	"fmt"
	"net/http"
)

func main() {
	http.HandleFunc("/", IndexHandler)
	http.HandleFunc("/hello", HelloHandler)

	http.ListenAndServe(":8080", nil)
}

func IndexHandler(writer http.ResponseWriter, request *http.Request) {
	fmt.Fprintln(writer, request.URL.Path)
}

func HelloHandler(writer http.ResponseWriter, request *http.Request) {
	for key, value := range request.Header {
		fmt.Fprintf(writer, "Header[%q] = %q\n", key, value)
	}
}
